package com.bawei.ivideo.test.log

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.Environment
import com.bawei.ivideo.R
import com.bawei.library_common.utils.LoggerUtils

class LogActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_log)
        //内部存储：data/data/包名/。。。
        val filesDir = filesDir
        LoggerUtils.d("内存存储files",filesDir.absolutePath)
        val cacheDir = cacheDir
        LoggerUtils.d("内存存储caches",cacheDir.absolutePath)
        //外部存储-私有目录
        val externalCacheDir = externalCacheDir
        LoggerUtils.d("外部存储私有目录caches",externalCacheDir?.absolutePath.toString())
        val externalFilesDir = getExternalFilesDir("")
        LoggerUtils.d("外部存储私有目录Files",externalFilesDir?.absolutePath.toString())


        //----------上面软件卸载直接删除，通过context

        //外部存储-9大公开目录
        val dcim = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)
        LoggerUtils.d("外部存储公开目录dcim",dcim.absolutePath.toString())
        //外部存储-根目录
        val externalStorageDirectory = Environment.getExternalStorageDirectory()
        LoggerUtils.d("外部存储根目录",externalStorageDirectory.absolutePath.toString())
    }
}